
#include "utils.h"

#include <attest/attest.h>

ATTEST(utils, power_of_two32)
{
  uint32_t x = 1;
  unsigned i;
  for(i = 0; i != 32; ++i) {
    ATTEST_EQ(x, COLFERS_POWER_OF_TWO64(i));
    x *= 2;
  }
}

ATTEST(utils, power_of_two64)
{
  uint64_t x = 1;
  unsigned i;
  for(i = 0; i != 64; ++i) {
    ATTEST_EQ(x, COLFERS_POWER_OF_TWO64(i));
    x *= 2;
  }
}

